package com.itheima.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * 用户信息通知状态对象 account_notification
 *
 * @author guanhuaer
 * @date 2025-03-20
 */
@Data
public class AccountNotification
        {
private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** 用户id */
    @ApiModelProperty("用户id")
    private Long userId;

    /** 系统，(0接收,1不接收) */
    @ApiModelProperty("系统，(0接收,1不接收)")
    private Long notice;

    /** 通知，(0接收,1不接收) */
    @ApiModelProperty("通知，(0接收,1不接收)")
    private Long systems;

    /** 私信，(0接收,1不接收) */
    @ApiModelProperty("私信，(0接收,1不接收)")
    private Long message;

    /** 创建时间 */
    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createDate;

    /** 修改时间 */
    @ApiModelProperty("修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateDate;

            public LocalDateTime getUpdateDate() {
                return LocalDateTime.now();
            }

            public void setUpdateDate(LocalDateTime updateDate) {
                this.updateDate = updateDate;
            }
        }
